home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / mint / l_1199 / 1607 < prev    next >
Encoding:
Internet Message Format  |  1994-08-27  |  1.4 KB

  1. From: benni@phil15.uni-sb.de (Benjamin Lorenz)
  2. Subject: Re: bug in mintlib44's access() function
  3. Date: Mon, 20 Jun 1994 17:32:02 +0200 (MET DST)
  4. In-Reply-To: <9406201509.AA23990@eos> from "Urs Thuermann" at Jun 20, 94 05:09:54 pm
  5. Mime-Version: 1.0
  6.  
  7.  
  8. > > So if this function
  9. > > tells me I can access a file, it will be true. 
  10. > No. Not even that.  If access() returns 0, it tells you you would have
  11. > access, if your effective id was equal to your real id, i.e. if you
  12. > execute another user's setuid program you may not have access to your
  13. > own files (if that user doesn't have), although access() returns 0
  14. > because it checks your real uid.
  15.  
  16. Right, look here:
  17.  
  18. --------------------------------------------------------------------
  19. benni@pfsparc02[p1] ~/tamtam% ll                                      (0) 17:23
  20. total 16
  21. -rw-r--r--  1 benni           0 Jun 20 17:21 test
  22. -rwsr-xr-x  1 uucp        16384 Jun 20 16:45 touch
  23. benni@pfsparc02[p1] ~/tamtam% ./touch test                            (0) 17:23
  24. ./touch: cannot change times on test: Permission denied
  25. benni@pfsparc02[p1] ~/tamtam%                                         (1) 17:23
  26. --------------------------------------------------------------------
  27.  
  28. But you can always do a setuid(UID) in touch (if you have the source...)
  29. to change the EUID from uucp to benni.
  30.  
  31. -- 
  32. Benjamin Lorenz, Brunnenweg 33, D-66133 Saarbruecken
  33. Phone: +49 681 815702, E-mail: lorenz@dfki.uni-sb.de
  34.  
  35.